Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

Support podman #1014

Merged
merged 4 commits into from
Apr 29, 2021
Merged

Support podman #1014

merged 4 commits into from
Apr 29, 2021

Conversation

tmds
Copy link
Member

@tmds tmds commented Apr 19, 2021

This makes tye work with rootless podman.

It requires podman 3.1+.

Users need to update their $HOME/.config/containers/containers.conf to allow containers to access services on the host:

[engine]

network_cmd_options=["allow_host_loopback=true"]

All tests pass except NginxIngressTest which fails for me due to #428.

Fixes #563

@davidfowl @jkotalik ptal

@tmds
Copy link
Member Author

tmds commented Apr 22, 2021

I ran these tests in a clean Fedora 33 VM.

I did the following configuration:

mkdir -p $HOME/.config/containers
cat >$HOME/.config/containers/containers.conf <<EOF
[engine]

network_cmd_options=["allow_host_loopback=true"]
EOF

sudo dnf -y update podman

Then ran:

./build.sh --test

All tests passed. For E2E:

 Assemblies Run
Microsoft.Tye.E2ETest.dll
Summary
Tests run: 81 — Skipped: 1, Run time: 1213.693s, Finished: 04/22/2021 09:44:38

Skipped tests
Skipped ❢  E2ETest.TyeRunTests.FrontendBackendAzureFunctionTest

@tmds
Copy link
Member Author

tmds commented Apr 27, 2021

@jkotalik can you review the PR? Functionally I think it's fine, but you may want to suggest some refactorings. I hope this can be part of the next tye release.

@jkotalik
Copy link
Contributor

LGTM besides an option to turn on and off.

@tmds
Copy link
Member Author

tmds commented Apr 28, 2021

@jkotalik I've added an option to tye.yaml that allows to select podman/docker. ptal at the changes.

@@ -13,6 +13,11 @@
"description": "Dockerhub username or hostname of remote registry. Used for tagging images.",
"type": "string"
},
"engine": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think containerEngine is a better name here.

Copy link
Contributor

@jkotalik jkotalik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pending a rename.

@tmds
Copy link
Member Author

tmds commented Apr 29, 2021

I've renamed the property.

I also relaxed the podman version check because I don't want risk it making things unusable. Instead of failing when we can't parse the version, we assume the version requirement is met.

@jkotalik jkotalik merged commit c3f3c6c into dotnet:main Apr 29, 2021
@jkotalik
Copy link
Contributor

Thanks!

@tmds
Copy link
Member Author

tmds commented Apr 30, 2021

@jkotalik thank you too. Do you have a rough idea when you'll do the next release?

@jkotalik
Copy link
Contributor

Hoping for one relatively soon 👍 . There are a few key bugs we need to fix first (.NET 6 support).

@davidfowl davidfowl mentioned this pull request Nov 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support podman based distributions
2 participants